import React from "react";
import Option1 from '../page/cart/index'
import Echart from '../page/cart/echart'
import Form from "../page/option/form";
import TeamPage from "../page/team/index";
import TeamAddPage from "../page/team/add";
import FilePage from "../page/file";
import LoginPage from "../page/login";
import ManagePage from "../page/manage/form2";
import ManageDetail from "../page/manage/detail";
import UserPage from "../page/user/index";
import UserSetPage from "../page/user/set";
import UserCenterPage from "../page/user/center";

// 图表
const Index = () => {return <Option1 />}
const About = () => {return <Echart />}
const Plan = () => {return <Form />}
const User = () => {return <UserPage />}
const UserSet = () => {return <UserSetPage />}
const UserCenter = () => {return <UserCenterPage />}
const Team = () => {return <TeamPage />}
const TeamAdd = () => {return <TeamAddPage />}
const File = () => {return <FilePage />}
const Login = () => {return <LoginPage />}
const Manage = () =>  {return <ManagePage />}
const Manage1 = () =>  {return <ManageDetail />}

const Router = {
    routes: [
        {
            path: "/tacos",
            name: "Manage",
            icon:'appstore',
            hasSub:1,
            subMenu: [
                {path: "/tacos/bus1", name: "Manage List", component: Manage},
                {path: "/tacos/bus/bus2", name: "Manage DES", component: Manage1}
            ]
        },
        {
            path: "/tacos/cart",
            name: "Cart",
            icon:'inbox',
            hasSub:1,
            subMenu:[
                {path: '/tacos/cart/option1', name: 'Cart Center', component: Index},
                {path: '/tacos/cart/option2', name: 'Cart Chart', component: About}
            ]
        },
        {
            path: '/tacos/user',
            name: 'User',
            hasSub:1,
            subMenu:[
                {path:'/tacos/user/user1',name:'User List',component: User},
                {path:'/tacos/user/user2',name:'User Set',component: UserSet},
                {path:'/tacos/user/user3',name:'User Center',component: UserCenter},
            ],
            icon:'user',
        },
        {
            path: '/tacos/team',
            name: 'Team',
            hasSub:1,
            subMenu:[
                {path:'/tacos/team/team1',name:'Team Des',component: Team},
                {path:'/tacos/team/team2',name:'Team Add',component: TeamAdd},
            ],
            icon:'team',
        },
        {
            path: '/tacos/file',
            name: 'File',
            hasSub:0,
            subMenu:[],
            icon:'file',
            component: File
        }
    ],
    loginPath:{
        path: '/login',
        name: 'login',
        title: '登录',
        hasSub:0,
        subMenu:[],
        icon:'file',
        component: Login
    }
}

export default Router;
